package com.kaluli.project.domain.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.kaluli.system.domain.entity.DomainEntity;


@Entity
@Table(name = "kll_order")
public class KllMainOrderDetail extends DomainEntity implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Column(name="order_number")
	
	private String orderNumber;
	public String getOrderNumber() {
		return orderNumber;
	}
	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}
	public String getIbillingNumber() {
		return ibillingNumber;
	}
	public void setIbillingNumber(String ibillingNumber) {
		this.ibillingNumber = ibillingNumber;
	}
	public String getProductTitle() {
		return productTitle;
	}
	public void setProductTitle(String productTitle) {
		this.productTitle = productTitle;
	}
	public Long getProductId() {
		return productId;
	}
	public void setProductId(Long productId) {
		this.productId = productId;
	}
	public Long getGoodsId() {
		return goodsId;
	}
	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}
	public Integer getDomesticExpressType() {
		return domesticExpressType;
	}
	public void setDomesticExpressType(Integer domesticExpressType) {
		this.domesticExpressType = domesticExpressType;
	}
	public String getDomesticOrderNumber() {
		return domesticOrderNumber;
	}
	public void setDomesticOrderNumber(String domesticOrderNumber) {
		this.domesticOrderNumber = domesticOrderNumber;
	}
	public Long getDomesticExpressTime() {
		return domesticExpressTime;
	}
	public void setDomesticExpressTime(Long domesticExpressTime) {
		this.domesticExpressTime = domesticExpressTime;
	}
	public Integer getDepotType() {
		return depotType;
	}
	public void setDepotType(Integer depotType) {
		this.depotType = depotType;
	}
	public Double getExpressFee() {
		return expressFee;
	}
	public void setExpressFee(Double expressFee) {
		this.expressFee = expressFee;
	}
	public Double getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}
	public Double getMarketing_fee() {
		return marketing_fee;
	}
	public void setMarketing_fee(Double marketing_fee) {
		this.marketing_fee = marketing_fee;
	}
	public Timestamp getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Timestamp orderTime) {
		this.orderTime = orderTime;
	}
	public Timestamp getPayTime() {
		return payTime;
	}
	public void setPayTime(Timestamp payTime) {
		this.payTime = payTime;
	}
	public Timestamp getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(Timestamp receiveTime) {
		this.receiveTime = receiveTime;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Integer getPayStatus() {
		return payStatus;
	}
	public void setPayStatus(Integer payStatus) {
		this.payStatus = payStatus;
	}
	public Integer getSource() {
		return source;
	}
	public void setSource(Integer source) {
		this.source = source;
	}
	public Long getHupuUid() {
		return hupuUid;
	}
	public void setHupuUid(Long hupuUid) {
		this.hupuUid = hupuUid;
	}
	public String getHupuUsername() {
		return hupuUsername;
	}
	public void setHupuUsername(String hupuUsername) {
		this.hupuUsername = hupuUsername;
	}
	public Integer getIsComment() {
		return isComment;
	}
	public void setIsComment(Integer isComment) {
		this.isComment = isComment;
	}
	public Integer getWareStatus() {
		return wareStatus;
	}
	public void setWareStatus(Integer wareStatus) {
		this.wareStatus = wareStatus;
	}
	public Timestamp getCreatedAt() {
		return createdAt;
	}
	public void setCreatedAt(Timestamp createdAt) {
		this.createdAt = createdAt;
	}
	public Timestamp getUpdatedAt() {
		return updatedAt;
	}
	public void setUpdatedAt(Timestamp updatedAt) {
		this.updatedAt = updatedAt;
	}
	@Column(name="ibilling_number")
	private String ibillingNumber;
	@Column(name="title")
	private String productTitle;
	
	@Column(name="product_id")
	private Long productId;
	@Column(name="goods_id")
	private Long goodsId;
	@Column(name="domestic_express_type")
	private Integer domesticExpressType;
	@Column(name="domestic_order_number")
	private String domesticOrderNumber;
	@Column(name="domestic_express_time")
	private Long domesticExpressTime;
	@Column(name="depot_type")
	private Integer depotType;
	@Column(name="express_fee")
	private Double expressFee;
	@Column(name="total_price")
	private Double totalPrice;
	@Column(name="price")
	private Double price;
	@Column(name="number")
	private Integer number;
	@Column(name="marketing_fee")
	private Double marketing_fee;
	@Column(name="order_time")
	private Timestamp orderTime;
	@Column(name="pay_time")
	private Timestamp payTime;
	@Column(name="receive_time")
	private Timestamp receiveTime;
	@Column(name="status")
	private Integer status;
	@Column(name="pay_status")
	private Integer payStatus;
	@Column(name="source")
	private Integer source;
	@Column(name="hupu_uid")
	private Long hupuUid;
	@Column(name="hupu_username")
	private String hupuUsername;
	@Column(name="is_comment")
	private Integer isComment;
	@Column(name="ware_status")
	private Integer wareStatus;
	@Column(name="created_at")
	private Timestamp createdAt;
	@Column(name="updated_at")
	private Timestamp updatedAt;
	
	@ManyToOne(cascade = CascadeType.ALL, optional = false)
	@JoinColumn(name="order_number", referencedColumnName="order_number",insertable = false, updatable = false)
	private KllMainOrder kllMainOrder;
	
	public KllMainOrder getKllMainOrder() {
		return kllMainOrder;
	}
	public void setKllMainOrder(KllMainOrder kllMainOrder) {
		this.kllMainOrder = kllMainOrder;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY,targetEntity=KllProduct.class)
	@JoinColumn(name="product_id",insertable = false, updatable = false)
	private KllProduct kllProduct;
	public KllProduct getKllProduct() {
		return kllProduct;
	}
	public void setKllProduct(KllProduct kllProduct) {
		this.kllProduct = kllProduct;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,targetEntity=KllProductSku.class,optional=false)
	@JoinColumn(name="goods_id",insertable = false, updatable = false)
	private KllProductSku kllProductSku;
	public KllProductSku getKllProductSku() {
		return kllProductSku;
	}
	public void setKllProductSku(KllProductSku kllProductSku) {
		this.kllProductSku = kllProductSku;
	}
	
	
}
